package com.lxmes.business.mapper;

import java.util.List;

import com.lxmes.business.domain.CcPurchaseInfo;
import com.lxmes.business.domain.CcPurchaseInfoSp;
import com.lxmes.common.annotation.DataScope;

/**
 * 采购审批单Mapper接口
 * 
 * @author zhangzhiyu
 * @date 2023-06-28
 */
public interface CcPurchaseInfoSpMapper 
{
    /**
     * 查询采购审批单
     * 
     * @param id 采购审批单主键
     * @return 采购审批单
     */
    public CcPurchaseInfoSp selectCcPurchaseInfoSpById(Long id);

    /**
     * 查询采购审批单列表
     * 
     * @param ccPurchaseInfoSp 采购审批单
     * @return 采购审批单集合
     */
    @DataScope(deptAlias = "de", userAlias = "de")
    public List<CcPurchaseInfoSp> selectCcPurchaseInfoSpList(CcPurchaseInfoSp ccPurchaseInfoSp);
    @DataScope(deptAlias = "de", userAlias = "de")
    public List<CcPurchaseInfoSp> selectCcPurchaseInfoSpSelectList(CcPurchaseInfoSp ccPurchaseInfoSp);
    /*根据多个id查询采购物料*/
    public List<CcPurchaseInfoSp> selectCcPurchaseInfoSpListByIds(Long [] ids);
    //采购订单入库
    @DataScope(deptAlias = "de", userAlias = "de")
    public List<CcPurchaseInfoSp> selectCcPurchaseInfoSpRk(CcPurchaseInfoSp ccPurchaseInfoSp);
    /**
     * 新增采购审批单
     * 
     * @param ccPurchaseInfoSp 采购审批单
     * @return 结果
     */
    public int insertCcPurchaseInfoSp(CcPurchaseInfoSp ccPurchaseInfoSp);

    /**
     * 修改采购审批单
     * 
     * @param ccPurchaseInfoSp 采购审批单
     * @return 结果
     */
    public int updateCcPurchaseInfoSp(CcPurchaseInfoSp ccPurchaseInfoSp);

    /**
     * 删除采购审批单
     * 
     * @param id 采购审批单主键
     * @return 结果
     */
    public int deleteCcPurchaseInfoSpById(Long id);

    /**
     * 批量删除采购审批单
     * 
     * @param ids 需要删除的数据主键集合
     * @return 结果
     */
    public int deleteCcPurchaseInfoSpByIds(Long[] ids);

    //获取今天的code编码
    public String getNewCode(String newDate);
}
